-- GENERATED SPELL FOR [Talon King Ikiss] --


function spell0_18473(pUnit, Event) --@Arcane Bubble,Self--
pUnit:FullCastSpellOnTarget(9438,pUnit)
pUnit:RegisterEvent('Sorts_18473', 8396, 1)
end

function spell1_18473(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(38197,pUnit)
pUnit:RegisterEvent('Sorts_18473', 5000, 1)
end

function spell2_18473(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(40425,pUnit)
pUnit:RegisterEvent('Sorts_18473', 5000, 1)
end

function spell3_18473(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(35059,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18473', 773, 1)
end

function spell4_18473(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(40424,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18473', 814, 1)
end

function spell5_18473(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(38194,pUnit)
pUnit:RegisterEvent('Sorts_18473', 825, 1)
end

function spell6_18473(pUnit, Event) --@Mana Shield,Self--
pUnit:FullCastSpellOnTarget(38151,pUnit)
pUnit:RegisterEvent('Sorts_18473', 775, 1)
end

function spell7_18473(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(38245,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18473', 8000, 1)
end

function spell8_18473(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(43309,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18473', 8000, 1)
end

function spell9_18473(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(35032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18473', 8436, 1)
end

function Sorts_18473(pUnit, Event)
local choix_sorts_18473 = math.random(0, 9)
if choix_sorts_18473 == 0 then
pUnit:RegisterEvent('spell0_18473', 1, 1)
end
if choix_sorts_18473 == 1 then
pUnit:RegisterEvent('spell1_18473', 1, 1)
end
if choix_sorts_18473 == 2 then
pUnit:RegisterEvent('spell2_18473', 1, 1)
end
if choix_sorts_18473 == 3 then
pUnit:RegisterEvent('spell3_18473', 1, 1)
end
if choix_sorts_18473 == 4 then
pUnit:RegisterEvent('spell4_18473', 1, 1)
end
if choix_sorts_18473 == 5 then
pUnit:RegisterEvent('spell5_18473', 1, 1)
end
if choix_sorts_18473 == 6 then
pUnit:RegisterEvent('spell6_18473', 1, 1)
end
if choix_sorts_18473 == 7 then
pUnit:RegisterEvent('spell7_18473', 1, 1)
end
if choix_sorts_18473 == 8 then
pUnit:RegisterEvent('spell8_18473', 1, 1)
end
if choix_sorts_18473 == 9 then
pUnit:RegisterEvent('spell9_18473', 1, 1)
end
end

function mob18473_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18473', math.random(1500, 3000), 1)
end

function mob18473_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18473_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18473_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18473, 1, 'mob18473_Action')
RegisterUnitEvent(18473, 2, 'mob18473_Leave')
RegisterUnitEvent(18473, 3, 'mob18473_Kill')
RegisterUnitEvent(18473, 4, 'mob18473_Die')
